#pragma once
#include <mutex>
#include <unordered_map>
class CSession;
class UserMgr
{
public:
	static UserMgr& GetInst();
	~UserMgr();
	std::shared_ptr<CSession> GetSession(int uid);
	void SetUserSession(int uid, std::shared_ptr<CSession> session);
	void RmvUserSession(int uid);
private:
	UserMgr();
	std::mutex _mutex;
	std::unordered_map<int, std::shared_ptr<CSession>> _uid_to_session;
};

